package com.dragon.account.entity;

import java.math.BigDecimal;
import java.util.Date;

import com.dragon.app.commons.dto.WithholdDTO;
import com.dragon.common.entity.BaseEntity;

public class MpPaymentWithholdLog  extends BaseEntity<Long> {
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Long id;
    /**客户编号**/
    private Long customerId;
    /**还款计划号**/
    private Long planId;
    /**合同id**/
    private Long contractId;
    /**A0交易中,A1入账中,A2交易完成,A9交易关闭**/
    private String logStatus;
    /**发起方流水号**/
    private String orgTransctionSeq;
    /**发起方交易金额**/
    private BigDecimal amount;
    /**发起方交易时间**/
    private Date orgTranctionDate;
    /**发起方查询次数**/
    private Integer orgQueryTimes;
    /**响应方流水号**/
    private String rtnTransctionSeqcopy;
    /**实际扣款金额**/
    private BigDecimal amountAct;
    /**返回结果时间**/
    private Date rtnTransctionDate;
    /**返回结果代码**/
    private String rtnResponseCode;
    /**返回结果描述**/
    private String rtnResponseDescription;
    /**最后更新时间**/
    private Date lastUpdateTime;
    /**最后更新人员**/
    private String lastUpdateUser;
    /**代扣标识 0-代扣发起 1-手动发起**/
    private String withholdFlag;
    /**是否提前结清 0 否 1-是**/
    private String isPrepayFlag;
    /**银行卡号**/
    private String cardNo;
    /**客户姓名**/
    private String customerName;
    /**手机号码**/
    private String mobile;
    /**身份证号**/
    private String icNumber;
    /**银行名称**/
    private String bankName;
    /**查询次数**/
    private Integer queryCount;
    /**还款类型: A001-自动代扣;A002-当前还款;A003-提前结清;A004-自定义还款;**/
    private String payType;
    /**交易完成时间**/
    private Date getTransctionDate;
    /**代扣是否直接返回成功**/
    private boolean withholdSuccess=false;
    /**备注由于返回调用代扣接口失败信息**/
    
    private String channel;
    private String batName;
    private String groupEng;
    private String reqChannel;
    
    public MpPaymentWithholdLog() {}
    
    public MpPaymentWithholdLog(WithholdDTO withholdDTO) {
    	this.setCustomerId(withholdDTO.getCustomerId());//客户ID
		this.setPlanId(Long.parseLong(withholdDTO.getPlanId()));
		this.setContractId(withholdDTO.getContractId());
		this.setLogStatus("A5");
		this.setOrgTransctionSeq(withholdDTO.getOrgTransctionSeq());
	
		this.setOrgTranctionDate(new Date());
		this.setOrgQueryTimes(0);
		this.setRtnTransctionSeqcopy(null);
		this.setAmount(withholdDTO.getAmount());
		this.setRtnTransctionDate(null);
		this.setRtnResponseCode(null);
		this.setRtnResponseDescription(null);
		this.setLastUpdateTime(new Date());
		this.setLastUpdateUser(withholdDTO.getMobileNo());
		this.setWithholdFlag(null);
		this.setCardNo(withholdDTO.getCustBankAccountNo());
		this.setCustomerName(withholdDTO.getRealName() );
		this.setMobile(withholdDTO.getCustBindPhoneNo());
		this.setIcNumber(withholdDTO.getIdentityCardNo());
		this.setBankName(withholdDTO.getBankName());
		this.setQueryCount(0);
		this.setPayType(withholdDTO.getType());
    }
    
    public String getReqChannel() {
		return reqChannel;
	}

	public void setReqChannel(String reqChannel) {
		this.reqChannel = reqChannel;
	}

	public String getGroupEng() {
		return groupEng;
	}

	public void setGroupEng(String groupEng) {
		this.groupEng = groupEng;
	}

	public String getBatName() {
		return batName;
	}

	public void setBatName(String batName) {
		this.batName = batName;
	}

	public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public Long getPlanId() {
        return planId;
    }

    public void setPlanId(Long planId) {
        this.planId = planId;
    }

    public Long getContractId() {
        return contractId;
    }

    public void setContractId(Long contractId) {
        this.contractId = contractId;
    }

    public String getLogStatus() {
        return logStatus;
    }

    public void setLogStatus(String logStatus) {
        this.logStatus = logStatus == null ? null : logStatus.trim();
    }

    public String getOrgTransctionSeq() {
        return orgTransctionSeq;
    }

    public void setOrgTransctionSeq(String orgTransctionSeq) {
        this.orgTransctionSeq = orgTransctionSeq == null ? null : orgTransctionSeq.trim();
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public Date getOrgTranctionDate() {
        return orgTranctionDate;
    }

    public void setOrgTranctionDate(Date orgTranctionDate) {
        this.orgTranctionDate = orgTranctionDate;
    }

    public Integer getOrgQueryTimes() {
        return orgQueryTimes;
    }

    public void setOrgQueryTimes(Integer orgQueryTimes) {
        this.orgQueryTimes = orgQueryTimes;
    }

    public String getRtnTransctionSeqcopy() {
        return rtnTransctionSeqcopy;
    }

    public void setRtnTransctionSeqcopy(String rtnTransctionSeqcopy) {
        this.rtnTransctionSeqcopy = rtnTransctionSeqcopy == null ? null : rtnTransctionSeqcopy.trim();
    }

    public BigDecimal getAmountAct() {
        return amountAct;
    }

    public void setAmountAct(BigDecimal amountAct) {
        this.amountAct = amountAct;
    }

    public Date getRtnTransctionDate() {
        return rtnTransctionDate;
    }

    public void setRtnTransctionDate(Date rtnTransctionDate) {
        this.rtnTransctionDate = rtnTransctionDate;
    }

    public String getRtnResponseCode() {
        return rtnResponseCode;
    }

    public void setRtnResponseCode(String rtnResponseCode) {
        this.rtnResponseCode = rtnResponseCode == null ? null : rtnResponseCode.trim();
    }

    public String getRtnResponseDescription() {
        return rtnResponseDescription;
    }

    public void setRtnResponseDescription(String rtnResponseDescription) {
        this.rtnResponseDescription = rtnResponseDescription == null ? null : rtnResponseDescription.trim();
    }

    public Date getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public String getLastUpdateUser() {
        return lastUpdateUser;
    }

    public void setLastUpdateUser(String lastUpdateUser) {
        this.lastUpdateUser = lastUpdateUser == null ? null : lastUpdateUser.trim();
    }

    public String getWithholdFlag() {
        return withholdFlag;
    }

    public void setWithholdFlag(String withholdFlag) {
        this.withholdFlag = withholdFlag == null ? null : withholdFlag.trim();
    }

    public String getIsPrepayFlag() {
        return isPrepayFlag;
    }

    public void setIsPrepayFlag(String isPrepayFlag) {
        this.isPrepayFlag = isPrepayFlag == null ? null : isPrepayFlag.trim();
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo == null ? null : cardNo.trim();
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName == null ? null : customerName.trim();
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile == null ? null : mobile.trim();
    }

    public String getIcNumber() {
        return icNumber;
    }

    public void setIcNumber(String icNumber) {
        this.icNumber = icNumber == null ? null : icNumber.trim();
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName == null ? null : bankName.trim();
    }

    public Integer getQueryCount() {
        return queryCount;
    }

    public void setQueryCount(Integer queryCount) {
        this.queryCount = queryCount;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType == null ? null : payType.trim();
    }

	public Date getGetTransctionDate() {
		return getTransctionDate;
	}

	public void setGetTransctionDate(Date getTransctionDate) {
		this.getTransctionDate = getTransctionDate;
	}

	public boolean isWithholdSuccess() {
		return withholdSuccess;
	}

	public void setWithholdSuccess(boolean withholdSuccess) {
		this.withholdSuccess = withholdSuccess;
	}

	public String getChannel() {
		return channel;
	}

	public void setChannel(String channel) {
		this.channel = channel;
	}
	
	
}